﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace tea.Models
{
    public class AjaxModel
    {
        public bool success { get; set; }
        public string message { get; set; }
        public string url { get; set; }
    }

    public class AjaxFailureModel : AjaxModel
    {
        public AjaxFailureModel(string message)
        {
            this.success = false;
            this.url = null;
            this.message = message;
        }
    }

    public class AjaxSuccessModel : AjaxModel
    {
        public AjaxSuccessModel(string url = null, string message = null)
        {
            this.success = true;
            this.url = url;
            this.message = message;
        }
    }

    public class SelectListItemModel
    {
        public int ID { get; set; }
        public string Text { get; set; }

        public SelectListItemModel()
        {
        }

        public SelectListItemModel(int id, string text)
        {
            this.ID = id;
            this.Text = text;
        }
    }

}